<template>
  <div>
    <van-tabbar v-model="active" active-color="#07c160">
      <van-tabbar-item icon="home-o" @click="goPage('/home')"
        >主页</van-tabbar-item
      >
      <van-tabbar-item icon="records" @click="goPage('/record')"
        >记录</van-tabbar-item
      >
      <van-tabbar-item icon="comment-o" @click="goPage('/knownledge')"
        >知识</van-tabbar-item
      >
      <van-tabbar-item icon="manager-o" @click="goPage('/user')"
        >我的</van-tabbar-item
      >
    </van-tabbar>
  </div>
</template>

<script>
export default {
  name: 'Footer',
  data() {
    return {
      active: 2
    }
  },
  methods: {
    goPage(target) {
      this.$router.push(target).catch(e=>e)
    }
  }
}
</script>

<style>
</style>